package com.vrv.app.cyberspace.modules.sys.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author sm
 * @since 2018-01-18
 */
@TableName("BASE_TABLE")
public class BaseTable extends Model<BaseTable> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 标题
     */
	private String title;
    /**
     * 发生日期
     */
	@NotNull(message = "happenTime不能为空")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	private Date happenTime;
    /**
     * 报送人ID
     */
	private String createUserID;
    /**
     * 是否可用 1-可用；2-今日快报(不可用) 3-待采用(不可用) 4-加入到预警事件管理(可用)
     */
	private Integer isEnabled;
    /**
     * 信息类型【根据信息类型去不同的扩展表中查询扩展信息 1--information_table；2--risk_table；3--event_table】
     */
	private Integer infoType;
    /**
     * 创建时间
     */
	private Date createTime;
    /**
     * 更新时间
     */
	private Date updateTime;
    /**
     * 是否事件通知过
     */
	private Integer isEventManage;
    /**
     * 是否风险通知过
     */
	private Integer isRiskManage;

	@TableField(exist = false)
	private UserTable createUserInfo;

	@TableField(exist = false)
	private Object extend;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getHappenTime() {
		return happenTime;
	}

	public void setHappenTime(Date happenTime) {
		this.happenTime = happenTime;
	}

	public String getCreateUserID() {
		return createUserID;
	}

	public void setCreateUserID(String createUserID) {
		this.createUserID = createUserID;
	}

	public Integer getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(Integer isEnabled) {
		this.isEnabled = isEnabled;
	}

	public Integer getInfoType() {
		return infoType;
	}

	public void setInfoType(Integer infoType) {
		this.infoType = infoType;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getIsEventManage() {
		return isEventManage;
	}

	public void setIsEventManage(Integer isEventManage) {
		this.isEventManage = isEventManage;
	}

	public Integer getIsRiskManage() {
		return isRiskManage;
	}

	public void setIsRiskManage(Integer isRiskManage) {
		this.isRiskManage = isRiskManage;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "BaseTable{" +
			", id=" + id +
			", title=" + title +
			", happenTime=" + happenTime +
			", createUserID=" + createUserID +
			", isEnabled=" + isEnabled +
			", infoType=" + infoType +
			", createTime=" + createTime +
			", updateTime=" + updateTime +
			", isEventManage=" + isEventManage +
			", isRiskManage=" + isRiskManage +
			"}";
	}

	public UserTable getCreateUserInfo() {
		return createUserInfo;
	}

	public void setCreateUserInfo(UserTable createUserInfo) {
		this.createUserInfo = createUserInfo;
	}

	public Object getExtend() {
		return extend;
	}

	public void setExtend(Object extend) {
		this.extend = extend;
	}
}
